package com.xrtn.mapper;

import com.xrtn.bean.AccountUserInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AccountUserInfoMapper {
    int deleteByPrimaryKey(Integer accountId);

    int deleteByUserId(Integer userId);

    int deleteByOrderId(Integer orderId);

    int deleteByCardMap(Map<String,Object> params);

    int insert(AccountUserInfo record);

    int insertSelective(AccountUserInfo record);

    AccountUserInfo selectByPrimaryKey(Integer accountId);

    List<AccountUserInfo> selectByMap(Map<String,Object> params);

    /**
     * 后台统计余额消费  ||  耗卡消费
     * @return
     */
    List<Map<String,Object>> selectSumCost(Map<String,Object> params);

    List<Map<String,Object>> selectUserAccountList(Map<String,Object> params);

    int updateByPrimaryKeySelective(AccountUserInfo record);

    int updateByPrimaryKey(AccountUserInfo record);

    int updateAccountUserInfoByPayFlag(@Param("payWay")Integer payWay, @Param("accountId")Integer accountId);
}